﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
    [DataContract, Table("hrm_mp_work_areas")]
    public class MasWorkArea
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "WorkAreaId", ResourceType = typeof(Resources.MasWorkAreaResource))]
        [Column("work_area_seq")]
        public int WorkAreaId { get; set; }

        [DataMember, Display(Name = "Code", ResourceType = typeof(Resources.MasWorkAreaResource))]
        public string Code { get; set; }

        [DataMember, Display(Name = "Name", ResourceType = typeof(Resources.MasWorkAreaResource))]
        [Column("work_area_name")]
        public string Name { get; set; }

        [ForeignKey("MasScope")]
        [DataMember, Display(Name = "ScopeId", ResourceType = typeof(Resources.MasWorkAreaResource))]
        [Column("scope_seq")]
        public int? ScopeId { get; set; }

        [EnumDataType(typeof(SYS.RecordStatus.EnumRecordStatus))]
        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.MasWorkAreaResource))]
        [Column("record_status")]
        public string RecordStatus { get; set; }

        [Column("created_by")]
        public int? CreatedBy { get; set; }

        [Column("created_when")]
        public DateTime? CreatedWhen { get; set; }

        [Column("updated_by")]
        public int? UpdatedBy { get; set; }

        [Column("updated_when")]
        public DateTime? UpdatedWhen { get; set; }

        [DataMember]
        public virtual MasScope MasScope { get; set; }
    }
}
